import JSEncrypt from 'jsencrypt/bin/jsencrypt.min.js';

export const publicKey = 'xxx';
export const privateKey = 'xxx';
const encrypt = new JSEncrypt();

export const encryption = (value: string): string => {
  encrypt.setPublicKey(publicKey);
  return encrypt.encrypt(value);
};

export const decrypt = (value: string): string => {
  encrypt.setPrivateKey(privateKey);
  return encrypt.decrypt(value);
};
